<?php
defined( '_JEXEC' ) or die( 'Restricted access' );

class Index extends Controller {
    protected $_r2c = NULL;
    
    function __construct() {
        parent::__construct();
        $this->_r2c = new responseToClient();
    }

    function index() {
        
//        $this->view->render('index/index', true);
    }

    function echo2client(){
        $args = func_get_args();
        $str1 = '';
        foreach ($args as $key => $value) {
            $str1 .= "$key:$value, ";
        }
        $this->_r2c->data = 'hello from method '.__METHOD__.', '.$str1;
        $this->_r2c->send(); 
    }
}